<template>
  <div style="width: 100%">
    <el-descriptions
      direction="vertical"
      title="个人信息介绍"
      :column="4"
      border
    >
      <el-descriptions-item label="姓名">{{
        userForm.name
      }}</el-descriptions-item>
      <el-descriptions-item label="科室">{{
        userForm.department
      }}</el-descriptions-item>
      <el-descriptions-item label="职位" :span="2">{{
        userForm.job
      }}</el-descriptions-item>
      <el-descriptions-item label="员工号码">
        <el-tag size="small">{{ this.$store.state.ID }}</el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="联系地址" :span="3">{{
        userForm.address
      }}</el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script>
export default {
  data() {
    return {
      id: this.$store.state.ID,
      userForm: {},
      rowCenter: {
        "text-align": "center",
      },
    };
  },
  methods: {
    load() {
      this.request
        .get("/EmployeeInfo/selectById", {
          params: {
            id: this.id,
          },
        })
        .then((req) => {
          this.userForm = req;
          console.log(userForm);
        });
    },
  },
  created() {
    this.load();
  },
};
</script>

<style>
</style>